﻿#ifndef SAVEPRIVATE_H
#define SAVEPRIVATE_H

#include <QObject>
#include <QString>

class ISave;
class SavePrivate : public QObject
{
    Q_OBJECT
private:
    explicit SavePrivate(int version, const QString &name, bool autoLoad, bool autoSave, ISave *q);

public:
    ~SavePrivate();

private:
    void setStopSave();
    QString saveFileName() const;
    QString backUpFileName() const;

private slots:
    void load();//载入
    void save();//保存

private:
    ISave * const q_ptr;
    friend class ISave;

    const int m_nVersion;
    const QString m_strName;

    bool m_bStopSave = false;
    bool m_bAutosave;
};

#endif // SAVEPRIVATE_H
